﻿using FluentNHibernate.Mapping;
using SimpleScrum.Core.Entities;

namespace SimpleScrum.Core.Mappings
{
    public class ProjectUserMap : ClassMap<ProjectUser>
    {
        public ProjectUserMap()
        {
            Table("ProjectUser");
            LazyLoad();
            Id(x => x.Id).Column("ID").GeneratedBy.GuidComb();
            References(x => x.Users).Column("UsersID").Cascade.All();
            References(x => x.Project).Column("ProjectID").Cascade.All();
            Map(x => x.MemberType).Column("MemberTypeID");
        }
    }
}